﻿#include "dialognn.h"
#include <QApplication>
#include <QLibraryInfo>
#include <QTranslator>
#ifdef WIN32
#include <io.h>
#include <fcntl.h>
#endif
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QTranslator qtTranslator;
    qtTranslator.load("qt_" + QLocale::system().name(),
                      QLibraryInfo::location(QLibraryInfo::TranslationsPath));
    app.installTranslator(&qtTranslator);

    QTranslator appTranslator;
    QString strTransLocalFile =
            ":/" +
            QCoreApplication::applicationName()+"_"+
            QLocale::system().name()+".qm";
    appTranslator.load(strTransLocalFile );
    app.installTranslator(&appTranslator);
    DialogNN w;
    w.show();
#ifdef WIN32
    setmode(fileno(stdout),O_BINARY);
    setmode(fileno(stdin),O_BINARY);
#endif
    return app.exec();
}
